package net.comm.group.db;


import java.sql.ResultSet;
import java.sql.SQLException;


import net.comm.group.bean.BaseGAlbum;
import net.comm.group.bean.BaseGFollForum;
import net.comm.group.bean.BaseGForum;
import net.comm.group.bean.BaseGroups;
import net.comm.oper.bean.Baseoperlog;
import net.comm.util.StringUtil;

import org.sakaiproject.db.api.SqlReader;

public class DbGAlbumService implements SqlReader
{

	/**
	 * Read from the result one set of fields to create a Resource.
	 * 
	 * @param result
	 *        The Sql query result.
	 * @return The Resource object.
	 */
	public Object readSqlResultRecord(ResultSet result)
	{
		try
		{

			int  	galbumID = result.getInt(1);	//
			int  	groupID = result.getInt(2);	//
			String  albumname = StringUtil.getValue(result.getString(3));	//相册名称
			String  albuminfo = StringUtil.getValue(result.getString(4));	//相册说明
			String 	afolder = StringUtil.getValue(result.getString(5));	//封面照片文件名
			int  	num = result.getInt(6);		//相片张数
			int  	userID = result.getInt(7);		//
			String  protect = StringUtil.getValue(result.getString(8));	//隐私设置
			String  delflg = StringUtil.getValue(result.getString(9));		//删除标志
			String  ctime = StringUtil.getValue(result.getString(10));		//
			String  mtime = StringUtil.getValue(result.getString(11));		//

			// create the Resource from these fields
			return new BaseGAlbum( galbumID,  groupID, albumname, albuminfo,  afolder,  num,  userID,
					 protect,  delflg,  ctime, mtime );
		}
		catch (SQLException e)
		{
			return null;
		}
		
	}
}
